
function Unload(){
    var me = this;
    domEvent.on(window, "beforeunload", function(e) {
        clientCollect.send("event", me.report());
    });
}
var UnloadPrototype = Unload.prototype;
UnloadPrototype.name = "unload";
UnloadPrototype.report = function(){
    return {
        "log_type": "event"
        ,"url": encodeURIComponent(this.url || window.location.href)
        // 事件分类为 time_spent
        ,"category": "behavior"
        // 分类行为为 跳出
        ,"action": "close_page"
        ,"title": encodeURIComponent(document.title)
    };
}

clientCollect.add(Unload);
